﻿// =================================================================== 
// 项目说明
//====================================================================
// 文件： ERP_BusinessLog.cs
// 创建时间：2017/1/7
// 负责人：
// ===================================================================
using System;
using System.Collections;
using System.Data;
using System.Collections.Generic;
using CRMMis.Model;
using CommonLib.Model;

//注意：该文件自动生成，一般请不要手工修改。


namespace CRMMis.IDAL
{
    /// <summary>
    /// 数据层 业务记录表 接口。
    /// </summary>
    public interface IERP_BusinessLogDALBase
    {
		#region 基本方法

		/// <summary>
		/// 向数据库ERP_BusinessLog中插入一条新记录。
		/// </summary>
		/// <param name="_ERP_BusinessLogModel">ERP_BusinessLog??</param>
		/// <returns>影响的行数</returns>
		int Add(CRMMis.Model.ERP_BusinessLog _ERP_BusinessLogModel);
		
		/// <summary>
		/// 向数据库ERP_BusinessLog中插入一条新记录。带事务
		/// </summary>
		/// <param name="sp">事务对象</param>
		/// <param name="_ERP_BusinessLogModel">ERP_BusinessLog实体</param>
		/// <returns>影响的行数</returns>
		int Add(DBTransaction lyTrans,CRMMis.Model.ERP_BusinessLog _ERP_BusinessLogModel);

		/// <summary>
		/// 向数据表ERP_BusinessLog更新一条记录。
		/// </summary>
		/// <param name="_ERP_BusinessLogModel">_ERP_BusinessLogModel</param>
		/// <returns>影响的行数</returns>
		int Update(CRMMis.Model.ERP_BusinessLog _ERP_BusinessLogModel);

		/// <summary>
		/// 向数据表ERP_BusinessLog更新一条记录。带事务
		/// </summary>
		/// <param name="sp">事务对象</param>
		/// <param name="_ERP_BusinessLogModel">_ERP_BusinessLogModel</param>
		/// <returns>影响的行数</returns>
		int Update(DBTransaction lyTrans,CRMMis.Model.ERP_BusinessLog _ERP_BusinessLogModel);

		/// <summary>
		/// 根据主键，删除数据表ERP_BusinessLog中的一条记录
		/// </summary>
	    /// <param name="logId">logId</param>
		/// <returns>影响的行数</returns>
		int Delete(int logId);

		/// <summary>
		/// 根据主键，删除数据表ERP_BusinessLog中的一条记录 带事务
		/// <param name="sp">事务对象</param>
	    /// <param name="LogId">logId</param>
		/// <returns>影响的行数</returns>
		int Delete(DBTransaction lyTrans,int logId);

		/// <summary>
		/// 根据条件串，删除数据表ERP_BusinessLog中的N条记录
		/// </summary>
	    /// <param name="sWhere">条件串</param>
		/// <returns>影响的行数</returns>
		int DeleteFK(string sWhere);

		/// <summary>
		/// 删除数据表ERP_BusinessLog中的一条记录,带事务
		/// </summary>
		/// <param name="sp">事务对象</param>
	    /// <param name="sWhere">条件串</param>
		/// <returns>影响的行数</returns>
		int DeleteFK(DBTransaction lyTrans,string sWhere);
		
		
		/// <summary>
        /// 检测是否存在该主键
        /// </summary>
        /// <param name="int logId" 主键列表</param>
        /// <returns>是/否</returns>
		bool Exists(int logId);

		/// <summary>
		/// 根据主键ID,得到 erp_businesslog 数据实体
		/// </summary>
		/// <param name="int logId" 主键列表</param>
		/// <returns>erp_businesslog 数据实体</returns>
		CRMMis.Model.ERP_BusinessLog GetModel(int logId );
        
        /// <summary>
        /// 根据where条件,得到 erp_businesslog 数据实体
        /// <para>如果存在多条，则返回第一条</para>
        /// </summary>
        /// <param name="sWhere" where条件</param>
        /// <returns> erp_businesslog 数据实体</returns>
        CRMMis.Model.ERP_BusinessLog GetModel(string sWhere);

		/// <summary>
		/// 根据主键ID,得到 erp_businesslog 数据实体，带事务
		/// </summary>
		/// <param name="int logId" 主键列表</param>
		/// <returns>erp_businesslog 数据实体</returns>
		CRMMis.Model.ERP_BusinessLog GetModel(DBTransaction dbTrans,int logId );
        
        /// <summary>
        /// 根据where条件,得到 erp_businesslog 数据实体，带事务
        /// <para>如果存在多条，则返回第一条</para>
        /// </summary>
        /// <param name="sWhere" where条件</param>
        /// <returns> erp_businesslog 数据实体</returns>
        CRMMis.Model.ERP_BusinessLog GetModel(DBTransaction dbTrans,string sWhere);
        
		/// <summary>
		/// 得到  erp_businesslog 数据实体
		/// </summary>
		/// <param name="row">row</param>
		/// <returns>erp_businesslog 数据实体</returns>
		CRMMis.Model.ERP_BusinessLog PopulateERP_BusinessLogModelFromDr(DataRow row);

		/// <summary>
		/// 得到  erp_businesslog 数据实体
		/// </summary>
		/// <param name="dr">dr</param>
		/// <returns>erp_businesslog 数据实体</returns>
		CRMMis.Model.ERP_BusinessLog PopulateERP_BusinessLogModelFromDr(IDataReader dr);

		/// <summary>
        ///  通过种子得到唯一ID,对单主键有效单，如果该表为多主键，则返回第一主键
        /// </summary>
        /// <param name="logId">logId</param>
        /// <returns>int</returns>
		int GetNewID();

		/// <summary>
		/// 得到最大ID
		/// </summary>
        /// <param name="logId">logId</param>
        /// <returns>int</returns>
		int GetMaxID();

		/// <summary>
		/// 得到数据表ERP_BusinessLog所有记录，可排序
		/// </summary>
        /// <param name="sWhere">条件字符串</param>
        /// <param name="sOder">排序字段</param>
		/// <returns>DataSet</returns>
		DataSet GetList(string sWhere, string sOder);

        /// <summary>
		/// 得到数据表ERP_BusinessLog所有记录，可排序，带事务的查询
		/// </summary>
        /// <param name="dbTrans">事务对象</param>
        /// <param name="sWhere">条件字符串</param>
        /// <param name="sOder">排序字段</param>
		/// <returns>DataSet</returns>
        DataSet GetList(DBTransaction dbTrans, string sWhere, string sOder);

		/// <summary>
		/// 根据条件和页号得到某页的记录集,+排序
		/// </summary>
        /// <param name="iPageSize">每页记录数</param>
		/// <param name="iPageIndex">页号</param>
		/// <param name="sWhere">条件字符串</param>
		/// <param name="sOder">排序字段</param>
        /// <returns>DataSet</returns>
		DataSet GetPageList(int iPageSize,int iPageIndex, string sWhere, string sOder);
		
		/// <summary>
		/// 判断某条记录所在的行号，调用者自己计算页号和行号
		/// </summary>
        /// <param name="iPageSize">每页记录数</param>,<param name="主键列表">主键列表</param>
        /// <returns>int 页码</returns>
		int GetRecorderRowNum(string sWhere, string sOder, int iPageSize, int logId);

		/// <summary>
		/// 得到符合条件记录集的记录条数
		/// </summary>
		/// <param name="FlowProcessId">流程ID</param>
        /// <param name="sWhere">条件字符串</param>
        /// <returns>int 记录数</returns>
		int GetRecorderCount(string FlowProcessId, string sWhere);

        #endregion
    }
}
